﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using HRS_Service.RoomWCF;
using BusinessComponents;

namespace HRS_Service
{
    public class RoomTypeService : IRoomTypeService
    {

        public List<BookingWCF.RoomType> getAllRoomType()
        {
            BusinessComponentsFacade facade = new BusinessComponentsFacade();
            List<BookingWCF.RoomType> rtList = new List<BookingWCF.RoomType>();
            IEnumerable<DataAccessLayer.RoomType> roomtypes = facade.findAllRoomType();
            foreach(DataAccessLayer.RoomType roomtype in roomtypes){
                rtList.Add(Utilities.convert(roomtype));
            }
            return rtList;
        }

        public List<BookingWCF.RoomType> getAvailableRoomType(DateTime startDate,DateTime endDate,int NoOfGuest)
        {
            BusinessComponentsFacade facade = new BusinessComponentsFacade();
            List<BookingWCF.RoomType> rtList = new List<BookingWCF.RoomType>();
            List<DataAccessLayer.RoomType> roomtypes = facade.FindAvailableRoomType(startDate,endDate,NoOfGuest);
            foreach (DataAccessLayer.RoomType roomtype in roomtypes)
            {
                rtList.Add(Utilities.convert(roomtype));
            }
            return rtList;
        }
        

        public List<BookingWCF.RoomType> getAllRoomTypeByID(string id)
        {
            throw new NotImplementedException();
        }



        public BookingWCF.RoomType getRoomTypeByID(string id)
        {
            throw new NotImplementedException();
        }


        public BookingWCF.RoomType getRoomType(BookingWCF.RoomType rt)
        {
            throw new NotImplementedException();
        }
    }
}
